<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Yansongda\LaravelPay\Facades\Pay;

class TestController extends Controller
{
    public function pay()
    {
        $payData = [
            'out_trade_no' => generateOrderNumber(),
            'description' => 'subject-测试',
            'amount' => [
                'total' => 1,
                'currency' => 'CNY',
            ],
            'payer' => [
                'openid' => request('openid',''),
            ]
        ];
//        $result = Pay::wechat()->mini($payData);
        return apiResponse(data: $payData);
    }
}
